package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AirportMapper;
import com.ruoyi.system.domain.Airport;
import com.ruoyi.system.service.IAirportService;

/**
 * 机场Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-10
 */
@Service
public class AirportServiceImpl implements IAirportService 
{
    @Autowired
    private AirportMapper airportMapper;

    /**
     * 查询机场
     * 
     * @param id 机场主键
     * @return 机场
     */
    @Override
    public Airport selectAirportById(Long id)
    {
        return airportMapper.selectAirportById(id);
    }

    /**
     * 查询机场列表
     * 
     * @param airport 机场
     * @return 机场
     */
    @Override
    public List<Airport> selectAirportList(Airport airport)
    {
        return airportMapper.selectAirportList(airport);
    }

    /**
     * 新增机场
     * 
     * @param airport 机场
     * @return 结果
     */
    @Override
    public int insertAirport(Airport airport)
    {
        return airportMapper.insertAirport(airport);
    }

    /**
     * 修改机场
     * 
     * @param airport 机场
     * @return 结果
     */
    @Override
    public int updateAirport(Airport airport)
    {
        return airportMapper.updateAirport(airport);
    }

    /**
     * 批量删除机场
     * 
     * @param ids 需要删除的机场主键
     * @return 结果
     */
    @Override
    public int deleteAirportByIds(Long[] ids)
    {
        return airportMapper.deleteAirportByIds(ids);
    }

    /**
     * 删除机场信息
     * 
     * @param id 机场主键
     * @return 结果
     */
    @Override
    public int deleteAirportById(Long id)
    {
        return airportMapper.deleteAirportById(id);
    }
}
